package Dao;

import entity.Orders;
import entity.Ticket;
import entity.Train;
import untils.Msg;

import java.sql.SQLException;
import java.util.ArrayList;

public interface BuyTicketsDao {
    ArrayList<Train> findTickesData(String startStation,String endStation,String timec,int carStation);

    Msg<Ticket> updateTicketsData(int userId,String idCard, Train train,String seatNumber) throws Exception;

    int findSeatNumberFromTickets(String seatNumber,int trainId) throws Exception;

    void findBuyState(int trainId) throws Exception;

    void findTicketStation(int seatId) throws SQLException;
    int findBuyTickets(String idCard, int trainId) throws Exception;
    Msg<Orders> findBuyRecord(int user_id, int trainId,int ticketId) throws Exception;

    void updateTicketNumber(int seatId) throws Exception;

    void updateOrderData(int userId,Train train, int ticketId) throws Exception;

    Msg<Orders> findOrderStation(int userId, int ticketId,int trainId) throws Exception;

    int findTicketId(String idCard, int trainId) throws Exception;

    void paymentOk(Orders order);


    Train findTrainData(int trainId);

    void deleteTickets(int ticketId) throws Exception;

    void deleteOrder(int ticketId) throws Exception;

    int findOrder(int ticketId);

    void addSeatTicket(int trainId, String seatType) throws Exception;
}
